<%-- 
    Document   : jadwalPemesananKamar
    Created on : Nov 10, 2011, 10:48:40 PM
    Author     : Renaldo Malau
--%>

<%@page import="com.mysql.jdbc.Statement"%>
<%@page import="databaseConnection.DatabaseConnection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body bgcolor="black">
        <table border="1" bgcolor="white">
            <tr>
                <td colspan="6" > 
                    <img src="images hotel/894_1_1000 bbg central hotel Bangkok 1.jpg" height="140" width="1350">
            <marquee style="font-family:Broadway BT;color:blue;font-size:20px">WELCOME TO HOTEL ADMF WEBSITE</marquee>
        </td>
            </tr>
            <tr>
                <td align="justify" valign="top" bgcolor="#69F"  height="500">

                    <img src="images hotel/menu header.jpg" height="65" width="270" align="middle">
                    <table border="1" style="background: #CF9" align="center" width="270">
                        <tr><td><a href="beranda.jsp"><input type="button" value="Beranda"/></a></td></tr>
                        <tr><td><a href="lihatInfo_pilihJenisRuang.jsp" ><input type="button" value="Lihat info ruang"/></a></td></tr>
                        <tr><td> <a href="pesan_pilihJenisRuang.jsp"><input type="button" value="Pesan ruang"/></a></td></tr>
                        <tr><td> <a href="jadwalPemesananKamar.jsp"><input type="button" value="Jadwal pemesanan Kamar"/></a></td></tr>
                        <tr><td> <a href="jadwalPemesananRestoran.jsp"><input type="button" value="Jadwal pemesanan restoran"/></a></td></tr>
                        <tr><td> <a href="jadwalPemesananGedung.jsp"><input type="button" value="Jadwal pemesanan gedung"/></a></td></tr>
                    </table>
                </td>

                <td width="80%" height="70%">


                    <%
                        DatabaseConnection conn = new DatabaseConnection();
                        java.sql.Statement statement = conn.connection.createStatement();

                    %>


                    <center><b><h1 style="background-color:#69F">Jadwal Pemakaian Kamar<HR></h1></b></center>
                    <h3>bulan Ini</h3>
                    <table border="1">
                        <%
                        java.sql.ResultSet resultKamar= statement.executeQuery("select * from jadwalpemakaiankamar");
                        String dataKamarvip[]=new String[31];
                        String dataKamar2vip[]=new String[31];
                        String dataKamarregular[]=new String[31];
                        String dataKamar2regular[]=new String[31];
                        String dataKamarvvip[]=new String[31];
                        String dataKamar2vvip[]=new String[31];
                        int j=0;
                        while(resultKamar.next()){
                            dataKamarvip[j]=resultKamar.getString("bulan1_vip");
                            dataKamar2vip[j]=resultKamar.getString("bulan2_vip");
                            dataKamarregular[j]=resultKamar.getString("bulan1_reguler");
                            dataKamar2regular[j]=resultKamar.getString("bulan2_reguler");
                            dataKamarvvip[j]=resultKamar.getString("bulan1_vvip");
                            dataKamar2vvip[j]=resultKamar.getString("bulan2_vvip");
                           j++;
                        }
                        
                        int i=1;
                        while(i<32){
                            %><tr><%
                            int k=1;
                            while(k>=1 &&k<=7){ %>
                            
                            <td><%=i%><br>
                             REGULAR kosong : <%=dataKamarregular[i-1]%><br>
                             VIP kosong : <%=dataKamarvip[i-1]%><br>
                             VVIP kosong : <%=dataKamarvvip[i-1]%>
                            </td>
                                
                                <%
                                i++;
                                k++;
                                if(i>31)
                                    break;
                            }
                            %><tr><%
                        }
                        %>
                    </table><br><br>
                    
                    
                    
                    <h3>bulan selanjutnya</h3>
                 <table border="1">
                        <%
                        i=1;
                        while(i<32){
                            %><tr><%
                            int k=1;
                            while(k>=1 &&k<=7){
                                %>
                            
                            <td><%=i%><br>
                             REGULAR kosong : <%=dataKamar2regular[i-1]%><br>
                             VIP kosong : <%=dataKamar2vip[i-1]%><br>
                             VVIP kosong : <%=dataKamar2vvip[i-1]%>
                            </td>
                                
                                <%
                                i++;
                                k++;
                                if(i>31)
                                    break;
                            }
                            %><tr><%
                        }
                        %>
                    </table>  
                    
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>
